package com.castrianni.vcs.util;

import java.util.Arrays;

public class DateTimeFormatToken {
  protected String _value = null;
  protected boolean _special = false;

  public DateTimeFormatToken(String value)
  {
    _value = value;
  }

  public String toString()
  {
    return(_value);
  }

  public boolean isSpecial()
  {
    if(Arrays.binarySearch(DateTimeFormatTokenMap.getSpecialChars(),_value.charAt(0)) >= 0)
      return(true);
    else
      return(false);
  }

  public int getCalendarField()
  {
    return(DateTimeFormatTokenMap.getCalendarField(_value.charAt(0)));
  }
}